<#assign module="workcar"/>

<@override name="header">
</@override>
<@override name="body">

	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default" style="height: 200px;">
				<div class="panel-heading">
					车牌号:${workCar.plateNumber?if_exists}
			    </div>
			    <div class="panel-body">
    				<form id="submit_form" action="${ctx}/workcar/appoint" class="form-horizontal" method="post">
		                <input type="hidden" name="workcarid" value="${workCar.id}">
		                
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>选择服务人员：</label>
		                    <div class="col-sm-3">
		                    	<select class="form-control" id="driverid" name="driverid">
		                    		<option value="">--未指派--</option>
		                    		<#list drivers as driver>
		                    			<option value="${driver.id}" <#if workCar.currentDriverId?? && workCar.currentDriverId==driver.id>selected="selected"</#if>>${driver.realname}</option>
		                    		</#list>
		                    	</select>
		                    </div>
		                </div>
		                
		                <div class="form-group" style="margin-left:10px;">
			                <label class="col-sm-3 control-label"></label>
			                <input type="submit" class="btn btn-primary" value="保存">
			                <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/workcar/list';" value="返回">
			            </div>
					</form>
					
        		</div>
			</div>
			
		</div>
		
	</div>
	
	<div class="row margin-top">
		<div class="col-xs-12">
		<div class="panel panel-primary">
		<div class="table-responsive">
			<table class="table table-hover table-striped">
				<thead>
				<tr style="font-size:14px;">
					<th>日期</th>
					<th>服务人员名称</th>
				</tr>
				</thead>
				<tbody>
					<#if (page.content)?? >
				  	<#list page.content as data>
						<tr>
							<td>${data.created?string("yyyy-MM-dd HH:mm:ss")}</td>
							<td>${data.driverName?if_exists}</td>
						</tr>
					</#list>
					</#if>
				</tbody>
			</table>
			<#if page.totalElements??>
			<ul class="pagination pull-right pagination-sm">
				<li><a>共 ${page.totalElements} 条数据</a></li>
				<@pg.pager items=page.totalElements?number maxPageItems=20 export="currentPageNumber=pageNumber" url="${ctx}/workcar/appoint/${workCar.id}">
					<@pg.index>
						<@pg.first>
							<li><a href="${pageUrl}">&laquo;</a></li>
						</@pg.first>
						<@pg.prev>
							<li><a href="${pageUrl}">&lsaquo;</a></li>
						</@pg.prev>
						<@pg.pages>
							<#if  currentPageNumber == pageNumber >
								<li class="active"><a href="#">${pageNumber}</a></li>
							<#else>
								<li><a href="${pageUrl}">${pageNumber}</a></li>
							</#if>
						</@pg.pages>
						<@pg.next>
							<li><a href="${pageUrl}">&rsaquo;</a></li>
						</@pg.next>
						<@pg.last>
							<li><a href="${pageUrl}">&raquo;</a></li>
						</@pg.last>
					</@pg.index>
				</@pg.pager>
			</ul>
			</#if>
		</div>
		</div>
		</div>
	</div>
	

</@override>
<@override name="footer">
<script type="text/javascript">
	<#if message??>
		$.scojs_message("${message}", $.scojs_message.TYPE_ERROR);
	</#if>
	<#if successMessage??>
		$.scojs_message("${successMessage}", $.scojs_message.TYPE_OK);
	</#if>
	$(document).ready(function(){
		
	});
</script>
</@override>
<@extends name="../layout.ftl"/>